package com.ywwxhz.plugins.tasks.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.ywwxhz.Util.Config;
import com.ywwxhz.plugins.tasks.TaskModel;
import com.ywwxhz.service.CoreService;

public class CleanReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Intent updateServer = new Intent(context, CoreService.class);
        updateServer.putExtra(Config.SERVICE_PARAM, TaskModel.MODEL);
        updateServer.putExtra(TaskModel.PARAM, TaskModel.KILL_ALL_PROC);
        updateServer.putExtra("from", intent.getStringExtra("from"));
        context.startService(updateServer);
    }
}
